import yaml

# def readYamlFile(file_name,key):
#     with open(file_name,'r') as f:
#         data=yaml.load(f,Loader=yaml.FullLoader)[key]
#         ret=list()
#         for k in data.keys():
#             v=data[k]
#             v['key']=k
#             ret.append(v)
#         return ret


"data/data_login.yaml",'test_login_001'
def readYamlFile(file_name,key):
    with open(file_name,'r') as f:
        data=yaml.load(f,Loader=yaml.FullLoader)[key]
        ret=list()
        for k in data.keys():
            v=data[k]
            v['key']=k
            ret.append(v)
        return ret


